//一级路由文件
export default [
    //首页
    {
        path: '/layout',
        name: 'layout',
        component: () => import('@/views/Layout.vue'),
        children: [
            {
                path: 'homeitem',
                name: 'homeitem',
                component: () => import('@/views/Home/HomeItem01.vue'),
                children: [
                    //柱状图
                    {
                        path: 'homeEcharts',
                        name: 'homeEcharts',
                        component: () => import('@/views/Home/HomeEacharts.vue'),
                        meta: [
                            {
                                name: '首页'
                            }
                        ]
                    },
                    //折线图
                    {
                        path:'homeLine',
                        name:'homeLine',
                        component:()=>import('@/views/Home/HomeLine.vue'),
                        meta: [
                            {
                                name: '首页'
                            }
                        ]
                    }
                ],
                meta: [
                    {
                        name: '首页'
                    }
                ]
            },
            //用户管理员
            {
                path: 'userManagement',
                name: 'userManagement',
                component: () => import('@/views/Layout/UserManagement.vue'),
                meta: [
                    {
                        name: '首页',
                        url: '/layout/homeitem'
                    },
                    {
                        name: '用户管理',
                        url: '#'
                    },
                    {
                        name: '管理员'
                    }
                ]
            },
            //学员管理页面
            {
                path: 'student',
                name: 'student',
                component: () => import('@/views/Layout/Student.vue'),
                meta: [
                    {
                        name: '首页',
                        url: '/layout/homeitem'
                    },
                    {
                        name: '用户管理',
                        url: '#'
                    },
                    {
                        name: '学员管理'
                    }
                ]
            },
            //课程添加
            {
                path: 'courseAdd',
                name: 'courseAdd',
                component: () => import('@/views/Layout/CourseAdd.vue'),
                meta: [
                    {
                        name: '首页',
                        url: '/layout/homeitem'
                    },
                    {
                        name: '课程管理',
                        url: '#'
                    },
                    {
                        name: '课程添加'
                    }
                ]
            },
            //课程列表
            {
                path: 'courseList',
                name: 'courseList',
                component: () => import("@/views/Layout/CourseList.vue"),
                meta: [
                    {
                        name: '首页',
                        url: '/layout/homeitem'
                    },
                    {
                        name: '课程管理',
                        url: '#'
                    },
                    {
                        name: '课程列表'
                    }
                ]
            },
            //视频模块
            {
                path: 'videoMode',
                name: 'videoMode',
                component: () => import('@/views/Layout/VideoMode.vue'),
                meta: [
                    {
                        name: '首页',
                        url: '/layout/homeitem'
                    },
                    {
                        name: '课程管理',
                        url: '#'
                    },
                    {
                        name: '视频模块'
                    }
                ]
            },
            {
                path:'/layout',
                redirect:'/layout/homeitem/homeEcharts'
            }
        ]
    },

    //login
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/Login/Login.vue')
    },
    //register
    {
        path: '/register',
        name: 'register',
        component: () => import('@/views/Register.vue')
    },
    //redirect
    {
        path: '/',
        redirect: {
            name: 'login'
        }
    },
    //notfound
    {
        path: "*",
        name: "notFound",
        component: () => import('@/views/NotFound.vue')
    }
]